home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swags_z.zip / TIMING.SWG / 0009_Giving Timeslices.pas < prev    next >
Pascal/Delphi Source File  |  1993-08-27  |  782b  |  39 lines

  1. {
  2. MARCO MILTENBURG
  3.  
  4. >> if you find SOURCE to detect/give up time slices For Windows/OS/2/Desqview,
  5. >> could you post it? I have stuff For Desqview, I believe.
  6.  
  7. >  Procedure GiveTimeSlice; Inline( $cd/$28 );
  8.  
  9. This is nice, but you have to be sure that you have enough stack space left,
  10. because Dos or TSR's that hook this interrupt will use SS:SP For their own
  11. stack. I use the following in my multitasker detect Unit :
  12. }
  13.  
  14. Procedure TimeSlice;
  15. Var
  16.   Regs : Registers;
  17. begin
  18.   Case OS_Type Of
  19.     _Dos :
  20.       begin
  21.       end;
  22.  
  23.     _DV,
  24.     _DVX :
  25.        begin
  26.          Regs.AX := $1000;
  27.          Intr($15, Regs);
  28.        end;
  29.  
  30.     _OS2,
  31.     _WINS,
  32.     _WIN3:
  33.       begin
  34.         Regs.AX := $1680;
  35.         Intr($2F, Regs);
  36.       end;
  37.   end;
  38. end;
  39.